//
//  jilupiandWarehouseCollectionViewCell.m
//  LeaClothing
//
//  Created by LeaClothing on 2019/7/17.
//  Copyright © 2019年 LeaClothing. All rights reserved.
//

#import "jilupiandWarehouseCollectionViewCell.h"

@implementation jilupiandWarehouseCollectionViewCell

- (void)awakeFromNib{
    [super awakeFromNib];
    self.cellCoverBlackView.frame =CGRectMake(self.cellCoverBlackView.frame.origin.x, self.cellCoverBlackView.frame.origin.y, (iPhoneWidth-60)/2, self.cellCoverBlackView.frame.size.height);
    UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:self.cellCoverBlackView.bounds byRoundingCorners:(UIRectCornerBottomLeft|UIRectCornerBottomRight)
                                                         cornerRadii:CGSizeMake(20, 20)];
    CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
    maskLayer.path = maskPath.CGPath;
    self.cellCoverBlackView.layer.mask = maskLayer;
    self.cellCoverBlackView.opaque = NO;
}

- (void)setIsAddCellView:(BOOL)isAddCellView{
    _isAddCellView = isAddCellView;
    self.cellCoverBlackView.hidden = isAddCellView;
    self.clothingNameLab.hidden = isAddCellView;
    self.clothingKindsLab.hidden = isAddCellView;
    self.clothingTypeImageView.backgroundColor = isAddCellView?AppMianColor:[UIColor clearColor];
    self.addCellViewCenterImgView.image =[UIImage imageNamed:isAddCellView?@"tianjiayiwuanniu":@""];
}

- (void)setClothingModel:(ClothingInfoModel *)clothingModel{
    _clothingModel = clothingModel;
    self.clothingTypeImageView.image = clothingModel.clothingTypeImg;
    self.clothingNameLab.text = clothingModel.clothingTypeName;
    self.clothingKindsLab.text = kFormat(@"%ld kinds", clothingModel.clothingSeriesArray.count);
}

+ (NSString *)jilupiandWarehouseCollectionViewCellID{
    return @"jilupiandWarehouseCollectionViewCellID";
}


@end
